﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yugi.Script;
using System.Xml.Serialization;
namespace Yugi.Client.Card
{
    [Serializable]
    public class YSpellCard : YBaseCard
    {
        private string script;

        /// <summary>
        /// Ma Thuc Thi Spell Card
        /// </summary>
        public string Script
        {
            get
            {
                return script;
            }
            set
            {
                script = value;
            }
        }
        public SpellType Type
        {
            get;
            set;
        }

        public void Active(IDictionary<string,object> pass_argument)
        {
            PythonEngine engine = PythonEngine.GetInsitance();
            if (script == "") return;
            if (engine.addSource(script))
            {
                engine.Excute(pass_argument);
            }
        }
    }
}
